import request from '@/utils/request'



//档案列表
export function getTableThird(query, pageNum, pageSize) {
  return request({
    url: '/archive/personnel/list?pageNum=' + pageNum + '&pageSize=' + pageSize,
    method: 'post',
    data: query
  })
}

//删除
export function deleteTr(data, remark) {
  return request({
    url: '/archive/personnel/remove?id=' + data + '&remark=' + remark,
    method: 'delete'
  })
}
// //批量删除
// export function deleteBatchTr(data) {
//   return request({
//     url: '/dataAnalysis/v2/base/civilAffairsBureau/batch/remove?batchNumber=' + data,
//     method: 'delete'
//   })
// }
//获取个人详情信息
export function getInfo(data) {
  return request({
    url: '/archive/personnel/getInfo',
    method: 'get',
    params: data
  })
}
//获取附件信息
export function getAnnexList(data) {
  return request({
    url: '/archive/annex/list',
    method: 'post',
    data: data
  })
}

//编辑
export function editPersonnel(data) {
  return request({
    url: '/archive/personnel/edit',
    method: 'post',
    data: data
  })
}

//新增档案接口
export function add(query) {
  return request({
    url: '/archive/personnel/add',
    method: 'post',
    data: query
  })
}

//删除附件
export function deleteFile(data) {
  return request({
    url: '/archive/annex/delete?id=' + data,
    method: 'delete'
  })
}

//区域列表接口
export function regionalList(query) {
  return request({
    url: '/archive/regional/list',
    method: 'post',
    data: query
  })
}
//保存提档信息
export function extAdd(query) {
  return request({
    url: '/extractArchives/add',
    method: 'post',
    data: query
  })
}

//
export function getStatis(data) {
  return request({
    url: '/extractArchives/extractStatistics',
    method: 'get',
    params: data
  })
}
//下载
export function annexDownload(query) {
  return request({
    url: '/archive/annex/download',
    method: 'post',
    data: query
  })
}

//下载
export function uploadBase64(query) {
  return request({
    url: '/archive/annex/upload/base64',
    method: 'post',
    data: query
  })
}
//获取学历接口educationSub
export function educationSub(data) {
  return request({
    url: '/archive/personnel/dictInfo/educationSub',
    method: 'get',
    params: data
  })
}
//上传裁剪文件
export function cropperImg(data) {
  return request({
    url: '/archive/annex/upload',
    method: 'post',
    params: data
  })
}


//整理
export function documentation(data) {
  return request({
    url: '/archive/personnel/documentation',
    method: 'post',
    data: data
  })
}

//确认整理
export function confirmOrga(data) {
  return request({
    url: '/archive/personnel/confirm/organization',
    method: 'post',
    data: data
  })
}

//借阅/归还
export function borrowAdd(data) {
  return request({
    url: '/archive/borrow/add',
    method: 'post',
    data: data
  })
}
//借阅/归还列表
export function borrowList(arcPersonnelId) {
  return request({
    url: '/archive/borrow/list?arcPersonnelId=' + arcPersonnelId,
    method: 'get',
  })
}
//借阅/归还详情
export function borrowInfo(id) {
  return request({
    url: '/archive/borrow/borrow/info?id=' + id,
    method: 'get',
  })
}


//资料信息列表
export function archivesList(data, pageNum, pageSize) {
  return request({
    url: '/office/archives/list?pageNum=' + pageNum + '&pageSize=' + pageSize,
    method: 'post',
    data: data
  })
}
//提供新增资料信息
export function archivesAdd(data) {
  return request({
    url: '/office/archives/add',
    method: 'post',
    data: data
  })
}
//资料检索
export function archivesSearch(data) {
  return request({
    url: '/office/archive/search',
    method: 'post',
    data: data
  })
}
//资料库数量
export function getFileTotal() {
  return request({
    url: '/office/archive/file/total',
    method: 'get',
  })
}
//本地上传文档在线预览地址
export function kkfileUrl() {
  return request({
    url: '/office/archive/kkfileUrl',
    method: 'get',
  })
}
//重新解析
export function parsing(id) {
  return request({
    url: '/office/archives/re/parsing?id=' + id,
    method: 'put',
  })
}
//下载
export function archivesDownload(id) {
  return request({
    url: '/office/archives/download?id=' + id,
    method: 'get',
  })
}

//资料库删除
export function dataDeleteTr(data) {
  return request({
    url: '/office/archives/remove?id=' + data,
    method: 'delete'
  })
}
//高拍仪预览接口
export function arAnnexList(pid) {
  return request({
    url: '/office/archives/annex/list?pid=' + pid,
    method: 'get',
  })
}

//获取资料库
export function getDataInfo(id) {
  return request({
    url: '/office/archives/' + id,
    method: 'get',
  })
}

//编辑资料库
export function dataUpdate(data) {
  return request({
    url: '/office/archives/update',
    method: 'post',
    data: data
  })
}